<?php
/**
 * 加载Iframe框架
 * @author yaoli<yaoli@pateo.com.cn>
 * @version 1.0 GetUser add by yaoli<yaoli@pateo.com.cn> 
 */
class map extends ActionBase1 {
	private $_uid = 0;
	private $_vin = 0;
	
	function init() {
		global $_SGLOBAL;
		$this->_uid = $_SGLOBAL['uid'];
		$this->_vin = $_SGLOBAL['vincode'];
	}
	public function action() {

	}
	public function index(){
		$this->template('map/index.html');	
	}
	public function amap(){
		$this->template('map/amap.html');	
	}
	public function search(){
		$this->template('map/search.html');	
	}
	//保存收藏位置点
	public function savePoiPointPost(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->savePoiPointPost($this->data['request']);
		echo $ret;
	}
	// 获取收藏位置点
	public function getPoiPoint(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->getPoiPoint($this->data['request']);
		echo $ret;
	}
	// 删除收藏位置点
	public function deletePoiPoint(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->deletePoiPoint($this->data['request']);
		echo $ret;
	}
	
	//保存已发送位置点
	public function saveSendPoiPoint(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->saveSendPoiPoint($this->data['request']);
		echo $ret;
	}
	//返回已发送位置点
	public function getSendPoiPoint(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->getSendPoiPoint($this->data['request']);
		echo $ret;
	}
	//删除已发送位置点
	public function deleteSendPoiPoint(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->deleteSendPoiPoint($this->data['request']);
		echo $ret;
	}
	//获取省份
	public function getPrvoince(){
		header('content-type:application/json;charset=utf-8');
		$ret = load_model("gis")->getPrvoince();
		echo $ret;
	}
	//获取城市
	public function getCity(){
		header('content-type:application/json;charset=utf-8');
		$adcode = $this->data['request']['adcode'];
		$ret = load_model("gis")->getCity($adcode);
		echo $ret;
	}
}
